package com.es.www;

import java.util.ArrayList;
import java.util.List;

/**
 * @Created by michangtao
 * @Date 2022/5/23 10:27
 * @Description
 */
public abstract class Subject {

    protected List<Observer> observers = new ArrayList<>();

    public void addObserver(Observer observer){
        observers.add(observer);
    }

    protected abstract void notifyObserver();
}
